package com.zyd.shiro.persistence.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zyd.shiro.persistence.beans.GoodsImage;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 数据访问接口
 * @author Administrator
 *
 */
public interface MallGoodsImageDao extends JpaRepository<GoodsImage,Integer>,JpaSpecificationExecutor<GoodsImage>{

    @Query(value = "select * from mall_goods_image image where image.goods_id = ?1",nativeQuery = true)
     List<GoodsImage> findByGoods_id(Integer goodsId);
}
